﻿<div class="row" style="height:80px;width:80%"></div>
<div class="container">
    <div class="col-md-4" style="border:solid,solid,solid,solid;border-bottom-color:#000000;border-width:1px">
        <h1>邮箱登录:</h1>
        <form role="form" id="boardForm" style="margin-bottom:10px">
            <div class="form-group">
                <input type="email" class="form-control" id="email" placeholder="你的email">
            </div>
            <div class="form-group">
                <input type="text" class="form-control" id="nickName" placeholder="你的昵称">
            </div>
            <button type="button" class="btn btn-info" onclick="emailLogin()">登录</button>
        </form>
    </div>
    <div class="col-md-4">
        <h1>社交登录:</h1>
        <div class="row">
            <ul class="list-inline" style="padding-left:20px">
                <li>
                    <a href="https://github.com/login/oauth/authorize?client_id=1e8991731cc506dd7aa3&scope=user,public_repo">
                        <img class="img-rounded" style="width:50px;height:50px;text-align:center;margin-right: 0px;" src="~/Content/images/icon/icon_github.png">
                        <p style="text-align:center">GitHub</p>
                    </a>
                </li>
                <li>
                    <a href="">
                        <img class="img-rounded" style="width:55px;height:55px;text-align:center;margin-right: 0px;" src="~/Content/images/icon/icon_QQ.png">
                        <p style="text-align:center">QQ</p>
                    </a>
                </li>
            </ul>
        </div>
    </div>
</div>
<script>
    function emailLogin() {
        $.post('Other/EmailLogin', {
            'nickName': $("#nickName").val(),
            'email':$("#email").val()
        }, function (data) {
            if (data == "success") {
                getHome();
            }
        });
    }
</script>